package com.aspose.cells.a.d;

public class zam extends zl {
   public com.aspose.cells.b.a.b.zq a;
   public boolean b = false;
   public int c = 0;
   public int d = -1;

   public zam(float var1, float var2, float var3, float var4, boolean var5) {
      this.a = new com.aspose.cells.b.a.b.zq();
      this.a.a(var1);
      this.a.b(var2);
      this.a.c(var3);
      this.a.d(var4);
      this.b = var5;
   }

   public zam(com.aspose.cells.b.a.b.zq var1, boolean var2) {
      this.a = var1;
      this.b = var2;
   }

   public boolean a(zam var1) {
      com.aspose.cells.b.a.b.zq var2 = var1.a;
      return this.a.f() >= var2.f() && this.a.g() >= var2.g() && this.a.l() <= var2.l() && this.a.m() <= var2.m();
   }

   public int b(zam var1) {
      com.aspose.cells.b.a.b.zq var2 = var1.a;
      com.aspose.cells.b.a.b.zq var3 = new com.aspose.cells.b.a.b.zq();
      int var4 = 0;

      for(int var5 = 0; (float)var5 < this.a.h() / var2.h() + 2.0F; ++var5) {
         for(int var6 = 0; (float)var6 < this.a.i() / var2.i() + 2.0F; ++var6) {
            if (this.b) {
               var3.a(var2.f() - var2.h() * (float)var5);
            } else {
               var3.a(var2.f() + var2.h() * (float)var5);
            }

            var3.b(var2.g() + var2.i() * (float)var6);
            var3.c(var2.h());
            var3.d(var2.i());
            if (a(var3, this.a)) {
               ++var4;
            }

            if (this.b) {
               if (var3.l() < this.a.j() && var3.k() > this.a.m()) {
                  return var4;
               }
            } else if (var3.j() > this.a.l() && var3.k() > this.a.m()) {
               return var4;
            }
         }
      }

      return 1;
   }

   static boolean a(com.aspose.cells.b.a.b.zq var0, com.aspose.cells.b.a.b.zq var1) {
      com.aspose.cells.b.a.b.zq var2 = new com.aspose.cells.b.a.b.zq(var0.d(), var0.e());
      var2.a(var1);
      return (double)var2.e().c() > 0.5D && (double)var2.e().b() > 0.5D;
   }

   public boolean c(zam var1) {
      com.aspose.cells.b.a.b.zq var2 = new com.aspose.cells.b.a.b.zq(var1.a.d(), var1.a.e());
      var2.a(this.a);
      return (double)var2.e().c() > 0.5D && (double)var2.e().b() > 0.5D;
   }

   public void a(ze var1) {
   }
}
